<?php
header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');

$_TOKEN_KEY = 'rH7/2*Zq^k=SB^tn(z8.h.OVP_(Z&.95';
$_SITE =  'www.bbb.com';

$_PHPSESSID = $_GET['PHPSESSID'];
$_TOKEN = $_GET['TOKEN'];

$_TOKEN_CHECK = md5(substr(md5($_SITE.$_PHPSESSID),8,16).$_TOKEN_KEY);

if($_TOKEN_CHECK == $_TOKEN){
    setcookie("PHPSESSID", $_GET['PHPSESSID'], time()+3600, "/", ".bbb.com");
}
